Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builtins: add pg_function_is_visible; pg_get_function_result #40902

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

jordanlewis
Copy link
Member

@jordanlewis jordanlewis commented Sep 19, 2019

Closes #33297.
Closes #31737.

Release note (sql change): add the pg_function_is_visible and
pg_get_function_result builtins.
Release justification: very low risk cosmetic pg compatibility builtin

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on idea + tests but minor nits on the implementation.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis)


pkg/sql/sem/builtins/pg_builtins.go, line 624 at r1 (raw file):

				funcOid := tree.MustBeDOid(args[0])
				t, err := ctx.InternalExecutor.QueryRow(
					ctx.Ctx(), "pg_get_function_identity_arguments",

curious: how come the string constant is different from the function name? what does "function identity arguments" mean?


pkg/sql/sem/builtins/pg_builtins.go, line 952 at r1 (raw file):

			ReturnType: tree.FixedReturnType(types.Bool),
			Fn: func(ctx *tree.EvalContext, args tree.Datums) (tree.Datum, error) {
				oid := args[0]

MustBeDOid or something here

Release note (sql change): add the pg_function_is_visible and
pg_get_function_result builtins.
Release justification: very low risk cosmetic pg compatibility builtin
@jordanlewis
Copy link
Member Author

Done - both were oversights. Thanks for the review!

bors r+

craig bot pushed a commit that referenced this pull request Sep 20, 2019
40902: builtins: add pg_function_is_visible; pg_get_function_result r=jordanlewis a=jordanlewis

Closes #33297.
Closes #31737.

Release note (sql change): add the pg_function_is_visible and
pg_get_function_result builtins.
Release justification: very low risk cosmetic pg compatibility builtin

Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com>
@craig
Copy link
Contributor

craig bot commented Sep 20, 2019

Build succeeded

@craig craig bot merged commit 3e19d99 into cockroachdb:master Sep 20, 2019
@jordanlewis jordanlewis deleted the pg-function-builtins branch September 21, 2019 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants